package icu.twtool.ui.router

import androidx.compose.runtime.Composable

/**
 * @author Wen
 * @since 2022-11-02
 */
class Route(
    val name: String,
    val comp: @Composable () -> Unit
) {

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as Route

        if (name != other.name) return false

        return true
    }

    override fun hashCode(): Int {
        return name.hashCode()
    }
}
